package com.ruoyi.forum.task;

import com.ruoyi.forum.service.CircleBlacklistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description:论坛定时处理任务
 * @Author: Hoda
 * @Date: Create in 2019-09-04
 * @Modified By:
 * @Modified Date:
 */
@Component
public class CircleTasks {

    @Autowired
    private CircleBlacklistService blacklistService;

    /**
     * 释放到期得小黑屋用户
     * <p>
     * 每1分钟执行一次
     */
    @Scheduled(cron = "0 */1 * * * ?")
    public void releaseBlackUser() {
        blacklistService.releaseExpiredUser();
    }
}
